<template>
  <div>
      <van-nav-bar
        title="商品详情"/> 
     <van-card
        :price="list.currentPrice"
        :desc="list.productName"
        :origin-price='list.originalPrice'
        :title="list.title"
        :thumb="list.imgUrl"
        />
     <van-goods-action>
        <van-goods-action-icon icon="chat-o" text="客服"  />
        <van-goods-action-icon icon="cart-o" text="购物车" @click="onClickIcon" />
        <van-goods-action-icon icon="shop-o" text="店铺" />
        <van-goods-action-button
            type="danger"
            text="立即购买"
            @click="onClickButton"
        />
</van-goods-action>
  </div>
</template>

<script>
import {getde}  from "../utils/api";
export default {
    props:['id'],
  data() {
    return {
        list:[],
    };
  },

  components: {},

  computed: {},

  mounted() {
      this.getlist();
  },

  methods: {
       async getlist() {
       const res = await getde( {productId:this.id});
       
       this.list=res.result
    },
    onClickButton(){},
    onClickIcon(){
         this.$router.push('/home/cart')
    },
  }
};
</script>
<style lang="less" scoped></style>
